﻿<phone:PhoneApplicationPage 
    x:Class="VinoCellar.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
 
        <!--Panorama control-->
        <controls:Panorama Title="vino cellar">
            <controls:Panorama.Background>
                <ImageBrush ImageSource="Images\PanoramaBackground.png"/>
            </controls:Panorama.Background>

            <controls:PanoramaItem Header="Get details">
                <Grid>
                    <Button Content="Get the details" Height="72" Margin="5,277,0,0" Name="btnGetDetails" VerticalAlignment="Top" HorizontalAlignment="Left" Width="231" Click="btnGetDetails_Click" />
                    <TextBox Height="72" HorizontalAlignment="Left" Margin="7,215,0,0" Name="txtUPC" VerticalAlignment="Top" Width="404">
                        <TextBox.InputScope>
                            <InputScope>
                                <InputScopeName NameValue="Number" />
                            </InputScope>
                        </TextBox.InputScope>
                    </TextBox>
                    <CheckBox Content="Add to the library when done" Height="72" HorizontalAlignment="Left" Margin="10,417,0,0" Name="cbAutoAddToLibrary" VerticalAlignment="Top" Width="384" IsChecked="True" Checked="cbAutoAddToLibrary_Checked" Visibility="Collapsed" />
                    <TextBlock Height="91" HorizontalAlignment="Left" Margin="15,19,0,0" Name="textBlock1" Text="Simply type in the UPC code of the bottle you want the details for or press the scan button to take a picture of the UPC code" VerticalAlignment="Top" Width="384" TextWrapping="Wrap" />
                    <Button Content="Snap" Height="72" HorizontalAlignment="Left" Margin="265,156,0,0" Name="btnSnap" VerticalAlignment="Top" Width="147" Click="btnSnap_Click" />
                    <HyperlinkButton Content="Example: 8014629140018" Height="30" HorizontalAlignment="Left" Margin="9,192,0,0" Name="hlExample" VerticalAlignment="Top" Width="237" FontSize="18" HorizontalContentAlignment="Left" Click="hlExample_Click" />
                </Grid>
            </controls:PanoramaItem>

            <!--Panorama item two-->
            <!--Use 'Orientation="Horizontal"' to enable a panel that lays out horizontally-->
            <controls:PanoramaItem Header="Wines">
                <!--Double line list with image placeholder and text wrapping-->
                <ListBox Margin="0,0,-12,0" ItemsSource="{Binding AllWineItems}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="0,0,0,17" Tap="StackPanel_Tap">
                                <!--Replace rectangle with image-->
                                <Image Height="100" Width="100" Margin="12,0,9,0" Source="{Binding WinePictureUrl}" />
                                <StackPanel Width="311">                                    
                                    <TextBlock Text="{Binding WineName}" TextWrapping="Wrap" FontWeight="Bold" FontSize="26" />
                                    <TextBlock Text="{Binding WineCountry}" TextWrapping="Wrap" />
                                </StackPanel>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PanoramaItem>

            <controls:PanoramaItem Header="About">
                <Grid>
                    <TextBlock Height="69" HorizontalAlignment="Left" Margin="25,22,0,0" Name="textBlock2" Text="Here's what might be comming in the next version:" VerticalAlignment="Top" Width="360" TextWrapping="Wrap" />
                    <TextBlock Height="33" HorizontalAlignment="Left" Margin="41,116,0,0" Name="textBlock4" Text="* Sync cellar with Evernote" VerticalAlignment="Top" Width="327" />
                    <TextBlock Height="33" HorizontalAlignment="Left" Margin="41,147,0,0" Name="textBlock5" Text="* Add personal notes to wines" VerticalAlignment="Top" Width="327" />
                    <TextBlock Height="33" HorizontalAlignment="Left" Margin="41,177,0,0" Name="textBlock6" Text="* Cellar search" VerticalAlignment="Top" Width="327" />
                    <TextBlock Height="33" HorizontalAlignment="Left" Margin="41,206,0,0" Name="textBlock7" Text="* SAQ search" VerticalAlignment="Top" Width="327" />
                    <TextBlock Height="30" HorizontalAlignment="Left" Margin="24,422,0,0" Name="textBlock8" Text="Simon Carpentier" VerticalAlignment="Top" Width="347" />
                    <TextBlock Height="53" HorizontalAlignment="Left" Margin="24,320,0,0" Name="textBlock3" Text="Check out the complete list of bugs, tasks and features on" TextWrapping="Wrap" VerticalAlignment="Top" Width="360" />
                    <HyperlinkButton Content="Codeplex" Height="30" HorizontalAlignment="Left" Margin="205,344,0,0" Name="hyperlinkButton1" VerticalAlignment="Top" Width="129" HorizontalContentAlignment="Left" FontSize="20" Click="hyperlinkButton1_Click" />
                </Grid>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>
</phone:PhoneApplicationPage>